package top.hcode.hoj.pojo.entity.course;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * @author orangej
 * @since 2024/12/17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "lesson学习进度", description = "")
public class LessonUserProgress implements Serializable {

    private static final long serialVersionUID = 5866848367320310506L;

    @TableId("id")
    private Long id;

    @ApiModelProperty(value = "课程id")
    private Long courseId;

    @ApiModelProperty(value = "课时id")
    private Long lessonId;

    @ApiModelProperty(value = "课时时长（单位秒）")
    private Integer lessonDuration;     // 课程时长（单位秒）

    @ApiModelProperty(value = "观看时长（单位秒）")
    private Integer watchDuration;      // 观看时长（单位秒）

    @ApiModelProperty(value = "是否完成")
    private Boolean finished;

    @ApiModelProperty(value = "用户id")
    private String uid;

    @ApiModelProperty(value = "团队id")
    private Long gid;

    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;
}
